package com.mingzhi.forum.dao;

import com.mingzhi.forum.model.Board;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BoardMapper {

    int insert(Board row);

    int insertSelective(Board row);

    Board selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Board row);

    int updateByPrimaryKey(Board row);

    /**
     * 根据 num 查询用户前N条有效数据
     */
    List<Board> selectByNum(@Param("num") Integer num);

    /**
     * 查询全部有效板块信息
     */
    List<Board> selectAllNormal();
}